---
title: clsAssignmentManager
summary: API reference for clsAssignmentManager.
status: draft
owner: SAIF Claims BOF team
last_reviewed: 2026-08-21
library: SAIF.Application.Claim.Legal
reference_type: embedded
---

# clsAssignmentManager

`clsAssignmentManager` runs the attorney assignment batch process (`RunAssignmentProcess`), which executes inside an explicit transaction and — outside of Production — runs in a "testing" mode ([Business rules](../../business-rules.md)). After the process runs it exposes assignment results/report data for display, and separately synchronizes assigned-case matter/activity data to Guidewire, skipping the sync when no attorney is assigned and logging (rather than surfacing) any Guidewire call failure ([Business rules](../../business-rules.md)). It inherits `LegalManagerBase` (this library) → `ClaimAppManager` (`SAIF.Application.Claim`).

## Purpose
- Run the attorney assignment batch process against the business-layer `clsAssignmentProcess`, wrapping execution in an explicit transaction with rollback-on-exception.
- Run the batch process in "testing" mode outside of Production so non-Prod runs do not affect live assignment state ([Business rules](../../business-rules.md)).
- Retrieve assignment results and report data for display after the batch process completes.
- Push matter and activity data for assigned cases to Guidewire, gated on an attorney being assigned and tolerant of integration failures ([Business rules](../../business-rules.md)).

## Context
- Namespace: `SAIF.Application.Claim.Legal`
- Assembly/package: `SAIF.Application.Claim.Legal.dll` (embedded library, referenced by the `Legal` web front end)

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| `New(inDatabase, inSecurityPrincipal)` | `Public Sub New(inDatabase As String, inSecurityPrincipal As clsSecurityPrincipal)` | Constructs the manager for the given database context and authenticated principal, calling into `LegalManagerBase.New`. |
| `Testing` | `Public ReadOnly Property Testing As Boolean` | Indicates whether the assignment batch process should run in test mode; true whenever `AppGlobal.EnvironmentService.GetApplicationEnvironment() <> Prod` ([Business rules](../../business-rules.md)). |
| `RunAssignmentProcess()` | `Public Sub RunAssignmentProcess()` | Instantiates `clsAssignmentProcess(DPI, Testing)`, runs it inside an explicit transaction (`OnTransactionStart`/`OnTransactionStop`), and rethrows any exception after ensuring the transaction is stopped. |
| `AssignmentList` | `Public ReadOnly Property AssignmentList As clsAssignmentListCollection`* | Exposes the summary list of assignment results produced by the last `RunAssignmentProcess()` call. |
| `AssignmentDetail` | `Public ReadOnly Property AssignmentDetail As clsAssignmentDetailCollection`* | Exposes the detailed per-case results produced by the last `RunAssignmentProcess()` call. |
| `SendDataToGw()` | `Public Sub SendDataToGw()` | Builds a `GwMatterRequest` from the assigned case's schedule data and calls the Guidewire `GwMatterApi` client, skipping the call when no attorney is assigned and logging (not throwing) on failure ([Business rules](../../business-rules.md)). |
| `CreateScheduleActivity()` | `Public Sub CreateScheduleActivity()`* | Pushes a Guidewire claim activity (hearing/mediation reserve reminder, due in 30 days) for `HEAR`/`MED` schedule types after a successful matter sync. |

## Behavioral notes
- `RunAssignmentProcess()` delegates its internal step sequence entirely to `SAIF.Business.Claim.Legal.clsAssignmentProcess.RunAssignmentProcess`; that library's own operation documentation should be consulted for the batch process's detailed logic*.
- `SendDataToGw()` retries a failed `Create` route call as an `Update` route call before giving up and logging the exception via `Logging.clsLogError.CreateError` — Guidewire sync failures never fail the underlying case save ([Business rules](../../business-rules.md)).

## Constraints and usage notes
- `RunAssignmentProcess()` must run within the explicit transaction it manages; callers should not wrap it in an outer transaction that conflicts with `OnTransactionStart`/`OnTransactionStop`*.

> **Note:** Statements marked with * were inferred from code structure, naming conventions, or
> contextual evidence where direct confirmation was not available in source artifacts.

## Sources
- `SAIF.Application.Claim.Legal\LegalNet\clsAssignmentManager.vb`
